/*
 * File Name:               DemoMainUsageView.cs
 *
 * Description:             普通类
 * Author:                  lisiyu <576603306@qq.com>
 * Create Date:             2016/11/23
 */

using UnityEngine.UI;

public class DemoMainUsageView : UIView
{
    private Button mBtnText;
    private Button mBtnImage;
    private Button mBtnButton;
    private Button mBtnInputField;
    private Button mBtnList;
    private Button mBtnToggle;
    private Button mBtnModel;
    private Button mBtnColor;

    protected override void onCacheComponents()
    {
        mBtnText = getComponent<Button>(0);
        mBtnImage = getComponent<Button>(1);
        mBtnButton = getComponent<Button>(2);
        mBtnInputField = getComponent<Button>(3);
        mBtnList = getComponent<Button>(4);
        mBtnToggle = getComponent<Button>(5);
        mBtnModel = getComponent<Button>(6);
        mBtnColor = getComponent<Button>(7);
    }

    protected override void onClearComponents()
    {
        mBtnText = null;
        mBtnImage = null;
        mBtnButton = null;
        mBtnInputField = null;
        mBtnList = null;
        mBtnToggle = null;
        mBtnModel = null;
        mBtnColor = null;
    }

    protected override void onAddListeners()
    {
        mBtnText.addListener(onBtnText);
        mBtnImage.addListener(onBtnImage);
        mBtnButton.addListener(onBtnButton);
        mBtnInputField.addListener(onBtnInputField);
        mBtnList.addListener(onBtnList);
        mBtnToggle.addListener(onBtnToggle);
        mBtnModel.addListener(onBtnModel);
        mBtnColor.addListener(onBtnColor);
    }

    protected override void onRemoveListeners()
    {
    }

    protected override void onOpen(object args)
    {
    }

    protected override void onClose()
    {
    }

    private void onBtnText()
    {
        openWindow<DemoTextWindow>(DemoPathEnum.DemoTextWindow);
    }

    private void onBtnImage()
    {
    }

    private void onBtnButton()
    {
    }

    private void onBtnInputField()
    {
    }

    private void onBtnList()
    {
        openWindow<DemoListWindow>(DemoPathEnum.DemoListWindow);
    }

    private void onBtnToggle()
    {
    }

    private void onBtnModel()
    {
    }

    private void onBtnColor()
    {
        openWindow<DemoColorWindow>(DemoPathEnum.DemoColorWindow);
    }
}